package com.atguigu.gulimall.search.model.vo;

import lombok.Data;

import java.util.List;

/**
 * 封装页面所有可能传递过来的查询条件
 * <p>
 * catalog3Id=225&keyword=OPPO&sort=saleCount_asc&hasStock=1&brandId=1&brandId=4&brandId=5&attrs=1_3G:4G:5G&attrs=12_2018:2019
 */
@Data
public class SearchParam {
    /**
     * 全文匹配关键字
     */
    private String keyword;

    /**
     * 排序条件
     * sort=saleCount_asc/desc
     * sort=hotScore_asc/desc
     * sort=skuPrice_asc/desc
     */
    private String sort;//排序条件

    /**
     * 过滤条件
     * hasStock是否有货、skuPrice区间、brandId、catalog3Id、attrs
     * hasStock=1
     * skuPrice=1_500/_500/500_
     * brandId=1&brandId=2
     * attrs=1_其他:安卓&attrs=2_4GB:6GB
     */
    private Integer hasStock;//是否只显示有货
    private String skuPrice;//价格区间查询
    private List<Long> brandId;//按照品牌查询，可多选
    private Long catalog3Id;//三级分类id
    private List<String> attrs;//按照属性查询，可多选

    private Integer pageNum = 1;//页码

    private String nativeQueryString;//原生的查询条件
}
